package org.come.control;

import org.come.action.FromServerAction;
import org.come.entity.Goodstable;
import org.come.until.DDGoodUntil;
import org.come.until.GoodsListFromServerUntil;
import org.come.until.GsonUtil;

/**
 * 
 * @author 黄建彬 接受典当的物品信息存储
 * 
 */
public class GetPawmControl implements FromServerAction {

	@Override
	public void controlMessFromServer(String mes, String type) {
		// 接收服务器返回的信息
		// 将典当的物品信息存放的静态类里面
		Goodstable goodsBean = GsonUtil.getGsonUtil().getgson().fromJson(mes, Goodstable.class);
		if (goodsBean.getStatus() == 2) {
			DDGoodUntil.addddgood(goodsBean);
		} else {
			GoodsListFromServerUntil.addGood(goodsBean);
		}
	}

}
